<template>
    <div>    

        <div class="welcome">
            <el-table :data="tableData" border style="width: 100%" class="welTable" v-loading="loading">
                <el-table-column prop="username" label="登入账户" width="180"></el-table-column>
                <el-table-column prop="lastLogin.ip" label="上次登入ip" width="180"></el-table-column>
                <el-table-column prop="lastLogin.loginTime" label="上次登入时间" sortable ></el-table-column>
                <el-table-column prop="nowLogin.ip" label="本次登录ip"></el-table-column>
                <el-table-column prop="nowLogin.loginTime" label="本次登录时间"></el-table-column>
            </el-table>
        </div>
    </div>
</template>





<script>
    import * as api from '@/api/pay'
    export default {
        meta:{
            title:"glsy",
            name:'管理首页',
            icon:'iconfont icon-xueyuan1',
        },
        data() {
            return {
                tableData: [
                    {
                    // date: '2016-05-02',
                    // name: '王小虎',
                    // time:'2022/08/28 21:51:41',
                    // address: '上海市普陀区金沙江路 1518 弄'
                    // }, {
                    // date: '2016-05-04',
                    // name: '王小虎',
                    // time:'2022/08/28 21:51:42',
                    // address: '上海市普陀区金沙江路 1517 弄'
                    // }, {
                    // date: '2016-05-01',
                    // name: '王小虎',
                    // time:'2022/08/28 21:51:43',
                    // address: '上海市普陀区金沙江路 1519 弄'
                    // }, {
                    // date: '2016-05-03',
                    // name: '王小虎',
                    // time:'2022/08/28 21:51:44',
                    // address: '上海市普陀区金沙江路 1516 弄'
                    // 
                    }
                ],
                loading:true
            }
        },
        mounted(){
            api.loginData()
            .then(res=>{
                // console.log('login',res);
                if(res.data.state){
                    this.tableData = res.data.data
                    this.loading = false
                }
            })
        }
    }
  </script>


<style lang='less' scoped>
    .welTable{
        margin-top: 50px;
        /deep/.has-gutter{
            text-align: center;
            line-height: 0;
        }
        /deep/.el-table__header-wrapper{
        line-height: 40px;
        }
        /deep/.cell{
            text-align: center;
        }
    }
  
    
    

    
</style>

